Substrate inspection device

ABSTRACT

In the substrate inspection apparatus  2  for inspecting a formation state of the pattern area  20  formed on the printed circuit board  1 , since the inside area data generation means  7  for generating inspection data of the inside area  21   b  of the pattern area  20  to be inspected, the outside area data generation means  10  for generating inspection data in the ring-shaped area  22   b  of the outside, and the inside/outside determination means  9  and  11  for determining whether the pattern area is defective or not defective by comparing the generated inside area data and the outside area data with the predetermined reference data are provided, by applying a relaxed inspection reference to the inside of the pattern area  20  where a relatively large defect is allowed and applying a strict inspection reference to the outside of the pattern area  20  where even a fine defect is not allowed, it is possible to adequately detect a defect.

TECHNICAL FIELD

The present invention relates to a substrate inspection apparatus forinspecting a formation state of a pad, wiring pattern etc. formed on aprinted circuit board.

BACKGROUND ART

In general, on a surface of a printed circuit board, pads, wiringpatterns, resists, silkscreen printings etc. are provided and by beingattached on a substrate inspection apparatus, the pads, wiring patternsetc. are inspected. As such substrate inspection apparatuses forinspecting pads or wiring patterns on a printed circuit board, varioussubstrate inspection apparatuses have been proposed. For example,apparatuses described in the patent literature 1 or 2 shown below exist.

A substrate inspection apparatus described in the patent literature 1includes an area discrimination part for discriminating pattern areas ona printed circuit board with respect to a taken image of a printed boardand an inspection part having an inspection treatment part forperforming a detecting processing of a defect to each pattern area onthe printed circuit board. After area information is formed on the basisof colors different at every pattern regions in an area dividing part,an inspection processing part detects a defect at every pattern area byapplying different design rules at every pattern area or comparing witha normal reference image. By the configuration, to a pattern area whereeven a fine defect is not allowed, a strict reference is applied and toa pattern area where a relatively large defect is allowed, a relaxedreference is applied to effectively detect defectives.

In a wiring pattern detection method described in the patent literature2, a fatal region pattern which shows necessary indispensable regionscorresponding to the center of a wiring pattern is compared with aninspected pattern obtained from wiring patterns on an object under testand a defect is detected from the non-coincidence of both patterns. Inparticular, in the patent literature 2, as shown in FIG. 14 in thepatent literature 2, if a crack which intrudes a fatal region pattern P2exists, it is determined to be defective, on the other hand, if a smallcrack which does not intrude the fatal region pattern P2 exists, it isdetermined to be non-defective.

Patent Literature 1: Japanese Unexamined Patent Application PublicationNo. 11-337498

Patent Literature 2: Japanese Unexamined Patent Application PublicationNo. 2000-241130

DISCLOSURE OF INVENTION Problem to be Solved by the Invention

To the pads or wiring patterns formed on the printed circuit board(hereinafter, referred to as “pattern area”), scratches or unevennessare easily formed on the surfaces during the forming processing of theprinted circuit board, and cracks or protruding parts are also easilyformed to the outline part. With respect to the cracks or the protrudingparts formed to the outline part, it is necessary to be strictlyinspected because there is a possibility that a short circuit occurswith adjacent pads or wiring patterns. On the other hand, with respectto the surface of the pad, it is sometimes preferred to qualify the padas non-defective if there is no quality failure even if a certain levelof scratch exists. However, in conventional printed circuit boardinspection methods, the pattern area is inspected as a whole and it hasnot been possible to precisely inspect the inside part and the outsidepart of the pattern area respectively.

Further, the inspection method in the patent literature 2 detectswhether cracks which intrude the fatal region pattern exist or not anddoes not independently detect the outside area of the wiring pattern.Accordingly, in the inspection method in the patent literature 2, evenin the case that a protrusion etc. which can cause a short circuit inthe outside area of the pad or wiring pattern exists, it is notdetermined as defective because the fatal region pattern is not intrudedby the protrusion.

The present invention has been made in view of the above-mentionedproblems, and an object of the present invention is to provide asubstrate inspection apparatus capable of more precisely and effectivelyinspect a pattern area formed on a surface of a substrate.

Means for Solving the Problem

To solve the above problems, in the present invention, a substrateinspection apparatus for inspecting a formation state of a pattern areaformed on a substrate which includes an inspection data generation meansfor generating inspection data in the inside and outside of a patternarea to be inspected, and a determination means for determining whetherthe pattern area is defective or not defective by comparing theinspection data of the inside of the pattern area generated by theinspection data generation means with predetermined inside referenceinspection data and comparing the inspection data of the outside withpredetermined outside reference inspection data is provided.

By the configuration, for example, because it is possible to apply arelaxed inspection reference to the inside part of the pad or wiringpattern to which a relatively large defect is allowed and a stricterinspection reference is applied to the outside part of the pad or wiringpattern to which even a fine defect is not allowed, it is possible tomore precisely and effectively detect a defect of the substrate.

Further, in this invention, the type of the inspection data of theinside of the pattern area differs from the type of the inspection dataof the outside of the pattern area.

In a preferred aspect, the inspection data of the inside of the patternarea is data about luminance and the inspection data of the outside ofthe pattern area is data about shapes.

By the configuration, with respect to the inside part, it is possible toaccurately inspect whether a scratch exists or not based on the dataabout luminance. Also, with respect to the outside part, it is possibleto accurately inspect whether a crack of the pad or a protrusion existsor not based on the data about positions.

Effects of the Invention

In the present invention, a substrate inspection apparatus forinspecting a formation state of a pattern area formed on a substratewhich includes an inspection data generation means for generatinginspection data in the inside and outside of a pattern area to beinspected, and a determination means for determining whether the patternarea is defective or not defective by comparing the inspection data ofthe inside of the pattern area generated by the inspection datageneration means with predetermined inside reference inspection data andcomparing the inspection data of the outside with predetermined outsidereference inspection data is provided. By the configuration, forexample, because it is possible to apply a relaxed inspection referenceto the inside part of the pad or wiring pattern to which a relativelylarge defect is allowed and a stricter inspection reference is appliedto the outside part of the pad or wiring pattern to which even a finedefect is not allowed, it is possible to more precisely and effectivelydetect a defect of the substrate.

BEST MODE FOR CARRYING OUT THE INVENTION

Hereinafter, an embodiment of the present invention is described withreference to drawings. FIG. 1 illustrates a block diagram of a substrateinspection apparatus 1 according to the embodiment. FIG. 2 illustratesdetails of a block diagram of an inside area data generation means 7.FIG. 3 illustrates a relation between a pattern area formed on a printedcircuit board 2 and an inspection area, and FIG. 3( a) illustrates apositional relation ship between a printed circuit board to be areference (hereinafter, referred to as “reference printed circuit board”) 2 a and the inside area and the outside area. FIG. 3( b) illustratesa relationship between a printed circuit board 2 b to be inspected andthe inside area and the outside area. FIG. 4 illustrates histogramswhich are used when determining a formation state of the inside area.FIG. 5 illustrates a position-luminance graph in an outside area tocalculate a position of an outline part of a pattern area in thecoordinate system. FIGS. 6 and 7 illustrate flowcharts which showoperation of the substrate inspection apparatus 1.

In this embodiment, the substrate inspection apparatus 1 obtains animage in a pattern area 20 (see FIG. 3) on the printed circuit board 2by using an photographing means 3 such as a camera and inspects theinside and the outside of the pattern area 20 by using differentinspection references. In FIG. 3, a bold solid line and the inside ofthe bold solid line is the pattern area 20 formed on the printed circuitboard 2. Hereinafter, a detailed description of a configuration of thesubstrate inspection apparatus 1 according to this embodiment is made.

In FIG. 1, the photographing means 3 captures a surface of the printedcircuit board 2 to be inspected or a printed circuit board 2 a which isto be a reference. In this embodiment, the photographing means 3 obtainsthe image of the surface by a gray scale of 256 gradations.

A preprocessing means 4 performs a processing such as an A/D conversionwith respect to the image on the printed circuit board 2 captured by theCCD camera and temporarily stores the processed data on an image memory5.

An outline extraction means 6 extracts an outline 20 a of the patternarea 20 from the data processed by the preprocessing means 4, binarizesthe obtained 256-gradation gray scale image by using a predeterminedthreshold, and data about the position of the binarized image isgenerated as the part changing from black to white or the part changingfrom white to black is the part of the outline 20 a part.

An inside area data generation means 7 performs a reduction processingon the extracted outline 20 a part to the inside and generates dataabout luminance within an inside area 21 b (shaded part in a directionslanting to lower right) of an inside doted-line part in FIG. 3( a).Specifically, histograms about the inside area 21 b to which thereduction processing is performed are generated and among thehistograms, generates data for comparing with two reference values whichare set to a light side and dark side in advance. In FIG. 2, a detailedblock diagram of the inside area data generation means 7 is shown. Theinside area data generation means 7 includes a first counting means 70and a second counting means 72.

Between them, the first counting means 70 extracts and countsrespectively, for example, pixels from luminance 150 to 250 out ofimages of the printed circuit board 2 stored on the image memory 5, andgenerates histograms of the reference printed circuit board 2 a andhistograms of the printed circuit board 2 b to be inspected. FIGS. 4(a), (b), and (c) illustrate these histograms. In FIGS. 4( a), (b), and(c), a thin solid line shows the histogram of the reference printedcircuit board 2 a and a bold solid line shows the histogram of theprinted circuit board 2 b to be inspected. The histogram of thereference printed circuit board 2 a is stored on a storage means 8, andwith respect to the histogram of the printed circuit board 2 b to beinspected, a correction processing is performed according to a color ofthe substrate, a color of the resist, whether a scratch on the surfaceof the pad exists or not etc. by a next histogram correction means 71.

The histogram correction means 71 calculates a reference averageluminance Ave1 of the histogram of the printed circuit board 2 b to beinspected while calculates a reference average luminance Ave0 of thehistogram to the reference printed circuit board 2 a, and corrects thenumber of pixels of each luminance of the printed circuit board 2 b tobe inspected so that the average luminance Ave1 corresponds to the Ave0.Describing the operation based on the histograms shown by the bold linein FIGS. 4( b) and (c), first, δ=Ave0−Ave1 is calculated, the luminanceof each pixel of the printed circuit board 2 b to be inspected isshifted by δ, and the histogram of the bold line is shifted to be thehistogram shown by the bold dotted line. Then, based on the correctedhistogram, data for indicating how much shifted to the light side, orinside reference data for indicating how much shifted to the dark sideas compared with the histogram of the reference printed circuit board 2a is generated.

The second counting means 72, firstly, generates an inside referencedata for indicating a permissible zone of shifts of a histogram.Specifically, as shown in FIG. 4( a), counts the number of pixels of afirst luminance P1 which is set to a dark side in advance to thehistogram of the reference printed circuit board 2 a, while carrying outan operation of S1 (rectangular-shaped area part in FIG. 4) which is avalue that the number of pixel is multiplied by a luminance width from aluminance 150 to the P1, counts the number of pixels to a secondluminance P2, and carries out an operation of S2 (also,rectangular-shaped area part) which is a value that the number of pixelis multiplied by a luminance width from the luminance P2 to the 250.Then, the values are stored on the storage means 8 as the insidereference data. With respect to the printed circuit board 2 b to beinspected, the corrected histogram is used, the number of pixels of eachluminance which is darker than the first luminance P1 is counted andadded respectively, and stored on the storage means 8 as S1′. Then, thenumber of pixels of each luminance which is lighter than the secondluminance P2 is counted and added respectively as S2′. By using the S1′,S1, and S2′, S2, it is determined whether the formation state of theinside area 21 b is good or bad.

An inside determination means 9 compares the number of pixels S1 and S2which are the inside reference data of the reference printed circuitboard 2 a counted by the second counting means 72 with the number ofpixels S1′ and S2′ which are the inside inspection data of the printedcircuit board 2 b to be inspected. If the number of pixels S1′ is largerthan S1, a decision that it is defective is output through an outputmeans 12. If the number of pixels S2′ is larger than S2, also, thedecision that it is defective is output through the output means.

Next, a configuration of an outside area data generation means 10 isdescribed. The outside area data generation means 10 generates data fordetermining a formation state of the outline 20 a part of the patternarea 20, and generates outside area data to be reference (hereinafter,referred to as “outside reference data”) and outside inspection data ofthe printed circuit board 2 b to be inspected. With reference to FIG. 3,an outline of processing in the outside area data generation means 10 isdescribed.

The outside area data generation means 10, first, in order to generatethe outside reference data, while performs expansion processing toexpand the outline 20 a to the outside as shown by the outside dottedline part in FIG. 3( a), generates a spline 20 b with respect to theoutline 20 a part extracted in the outline extraction means 6, andgenerates a graph with respect to luminance in an area (hereinafter,referred to as “ring-shaped area”) 22 b between the inside area 21 b andthe expansion-processed outline 22 a in a normal line direction 20 c ofthe spline 20 b. FIG. 5 illustrates a graph about theposition-luminance. In FIG. 5, an original point is set to the outline20 a part of the inside area 21 b, and the direction of the outside areais set to the plus side. Generally, since the inside of the pattern area20 is formed of a metal, the luminance is high. On the other hand, sincethe outside of the pattern area 20 is formed of a resist etc, theluminance is low. An inflection point of the graph is to be the outline20 a part of the pattern area 20. Then, the outside area data generationmeans 10 detects inflection points in all coordinate systems shifted byseveral pixels in the spline 20 b direction, and stores the detectedpoints on the storage means 8 as the outside reference data.

Next, the outside area data generation means 10 generates outsideinspection data of the printed circuit board 2 b to be inspected.Specifically, as shown in FIG. 3( b), the ring-shaped area 22 b issuperimposed on the pattern area 20 to be inspected, and as shown inFIG. 5, the graph about the luminance in the normal line direction 20 cof the spline 20 b is generated. Then, the inflection point x of thegraph, that is, the position of the outline 20 a in the coordinatesystem of the pattern area 20 to be inspected is detected, the positionof the inflection point x in each coordinate system shifted by severalpixels in the spline 20 b direction is detected, and the outsideinspection data is generated.

An outside determination means 11 compares thus generated outsidereference data with the outside inspection data and determines whether adistance |x−x0| which is a distance of each inflection point x0 and x ineach normal line direction 20 c is within a predetermined referencevalue δ0 or not. In a case of |x−x0|>δ0, it is determined that a crackor protrusion exists in the outline 20 a part and it is defective, andthe determination is output through the output means 12. In a case of|x−x0|≦δ0, it is determined that a crack or protrusion does not exist inthe outline 20 a part and it is non-defective, and the determination isoutput through the output means 12.

With reference to FIGS. 6 and 7, a processing flow of thus configuredsubstrate inspection apparatus 1 is described. First, in FIG. 6, a flowof generating reference data which is necessary when inspecting theprinted circuit board 2 b to be inspected is shown and in FIG. 7, a flowin a case of inspecting the printed circuit board 2 b to be inspected isshown.

<Generation of Inside Reference Data and Generation Flow of OutsideReference Data>

First, when generating inside reference data, the reference printedcircuit board 2 a is attached on a predetermined position on thesubstrate inspection apparatus 1 by using a reference mark (not shown)which is formed on the surface and an image of the surface of theprinted circuit board 2 a is obtained by using the photographing means 3(step S1). Then, the obtained image is converted by A/D conversion bythe preprocessing means 4 (step S2), and the converted image informationis written on the image memory 5. Thus obtained image is binarized byusing a predetermined luminance value, and the part changing from blackto white or the part changing from white to black is stored as theoutline 20 a part on the storage means 8 (step S3)

Then, a reduction processing is performed with respect to the outline 20a part (step S4), with respect to the reduced inside area 21 b, each ofthe number of pixels of luminance from luminance 150 to 250 out of thegray scale of 256 gradations is counted, and a histogram as shown inFIG. 4( a) is generated (step S5). Then, first, from the generatedhistogram, a reference average luminance Ave0 is obtained (step S6). Tothe predetermined first luminance P1 and the predetermined secondluminance P2, the number of pixels of the first luminance P1 and thesecond luminance P2 are counted, the number of pixels S1 which isobtained by multiplying the number of pixels of the first luminance P1by a luminance width from the luminance 150 to P1, and the number ofpixels S2 which is obtained by multiplying the number of pixels of thesecond luminance P2 by a luminance width from the luminance P2 to 250are calculated (step S7), and the number of pixels S1 and the number ofpixels S2 are stored as the inside reference data on the storage means 8(step S8).

When outside reference data is generated, first, expansion processing isperformed with respect to the outline 20 a part (step S9), andinformation about pixels from the reduced area to the outsidering-shaped area 22 b is gathered. Then, as shown in FIG. 5, aposition-luminance graph with respect to the normal line direction 20 cof the spline 20 b of the outline 20 a is generated (step S10), in thegraph, the position x0 of an inflection point where the differentialvalue of luminance makes the largest change is calculated. Then,information about an inflection point in each coordinate system in whichthe inflection point is shifted by several pixels in the spline 20 bdirection is stored as the outside reference data on the storage means 8(step S11).

Then, the reference printed circuit board 2 a is detached from thesubstrate inspection apparatus 1, and prepared for an inspection of theprinted circuit board 2 b to be inspected.

<Inspection Processing of Printed Circuit Board 2 to be Inspected>

When a formation state of the printed circuit board 2 b to be inspectedis inspected, similarly, first, attached to a predetermined position onthe substrate inspection apparatus 1 by using the reference mark, and animage of the surface of the printed circuit board 2 b is obtained (stepT1). Then, the obtained image is converted by A/D conversion by thepreprocessing means 4 (step T2), and the information is written on theimage memory 5.

Then, the positional information of the inside area 21 b of thereference printed circuit board 2 a which has already stored on thestorage means 8 is read, superimposed on the pattern area 20 of theprinted circuit board 2 b to be inspected (step T3), and informationabout the inside pixels is gathered. Similarly, with respect to thearea, the number of pixels of luminance from luminance 150 to 250 by thegray scale of 256 gradations is counted, while histograms shown in FIGS.4( b) and (c) by the bold solid line are generated (step T4), an averageluminance Ave1 is calculated from the generated histograms (step T5).Then, a difference δ between the calculated average luminance Ave1 andthe reference average luminance Ave0 of the reference printed circuitboard 2 a is calculated, and a correction processing in which eachluminance in the histogram generated in step T3 is shifted by the amountof δ is performed (step T6). Based on the corrected histogram, whileeach of the number of pixels S1′ which has darker luminance than thepredetermined first luminance P1 is calculated, each of the number ofpixels S2′ which has lighter luminance than the second luminance P2 iscalculated (step T7), according to a determination with the insidereference data S1 and S2 (step T8), an output of a determination thatthe printed circuit board 2 b is defective is performed (step T9).Further, also, when the number of pixels S2′ of the printed circuitboard 2 b to be inspected is larger than the number of pixels S2 of thereference printed circuit board 2 a (step T7), an output of adetermination that the printed circuit board 2 b is defective isperformed (step T9). That is, when S1′ is larger than the firstreference number of pixels S1, because the possibility that a crackexists more than a scratch by polishing is high, it is determined to bedefective. Also, when S2′ is larger than the second reference number ofpixels S2, because the possibility that a protrusion etc. exists on apad is high, it is determined to be defective. On the other hand, ifS1′≦S1 and S2′≦S2 (step T8), it is determined that the printed circuitboard 2 b is non-defective and the determination is output (step T10).

Then, in order to inspect a formation state of the outline 20 a part,information about pixels in the ring-shaped area 22 b where thering-shaped area 22 b of the reference printed circuit board 2 a issuperimposed on the pattern area 20 to be inspected is gathered (stepT11). With respect to the ring-shaped area 22 b, a position-luminancegraph about luminance in the normal line direction 20 c of the spline 20b of the reference printed circuit board 2 a is generated (step T12),and an inflection point in the graph is detected (step T13). A similarprocessing is performed by shifting by several pixels in the spline 20 bdirection, a distance δ0 between a position x of the detected inflectionpoint and a position x0 of the inflection point which has already beenstored on the storage means 8 is compared and determined (step T14), ifthe distance exceeds a predetermined threshold δ0, an output of adetermination that it is defective is performed (step T15). On the otherhand, if the distance between the position x of the detected inflectionpoint and the position x0 of the inflection point which has already beenstored on the storage means 8 is within the predetermined threshold δ0,an output of a determination that it is non-defective is performed (stepT16).

As described above, according to this embodiment, in the substrateinspection apparatus 1 for inspecting a formation state of the patternarea 20 such as a pad or wiring pattern formed on the printed circuitboard 2 b, since the inside area data generation means 7 for generatinginspection data of the inside area 21 b of the pattern area 20 to beinspected, the outside area data generation means 10 for generatinginspection data of the ring-shaped area 22 b of the outside, and theinside determination means 9 and the outside determination means 11 fordetermining whether the pattern area 20 is defective or not defective bycomparing the generated inside area data with the predetermined insidereference data and comparing the outside area data with the outsidereference data are provided, by applying a relaxed inspection referenceto the inside area 21 b of the pattern area 20 where a relatively largedefect is allowed and applying a strict inspection reference to thering-shaped area 22 b of the pattern area 20 where even a fine defect isnot allowed, it is possible to precisely and effectively detect a defectof the printed circuit board 2 b.

Further, in this embodiment, since the type of the inside area data isdata about luminance, that is, data which indicates shifts ofhistograms, it is possible to accurately inspect a scratch or unevennessin the inside area 21 b, and since the type of the outside area data isdata about positions of the outline 20 a, it is possible to accuratelyinspect a crack or a protruding part in the outline 20 a part.

The present invention is not limited to the above embodiment, can beapplied in various modifications.

For example, in the above embodiment, the inspection of the printedcircuit board 2 is exemplarily described, however, it is not limited tothe above, applicable to a case of inspecting a pattern on a glasssubstrate.

Further, in the above embodiment, the data which indicates shifts of thehistograms is to be the inside area data and the data which indicatesthe position of the outline 20 a of the pattern area 20 is to be theoutside area data. However, it is not limited to the above, any methodcan be applied if the method inspects the inside area and the outsidearea by using different reference values.

INDUSTRIAL APPLICABILITY

When inspecting a formation state of the pattern area 20 formed on theprinted circuit board 1, by independently inspecting the inside area 21c of the pattern area 20 and the ring-shaped area 22 b of the outsiderespectively, it is possible to apply a relaxed reference to the insideof the pattern area 20 where a relatively large defect is allowed andapply a strict reference to the outside of the pattern area 20 whereeven a fine defect is not allowed. Further, particularly, with respectto the ring-shaped area 22 b, since a determination reference aboutshapes is used to inspect, it is possible to prevent a short circuitetc. with the adjacent pattern area 20.

BRIEF DESCRIPTION OF THE DRAWINGS

[FIG. 1] A block diagram of a substrate inspection apparatus accordingto an embodiment of the present invention.

[FIG. 2] A detailed block diagram of an inside area data generationmeans according to the embodiment of the present invention.

[FIG. 3] A view illustrating a relation between a pattern area formedand an inspection area according to the embodiment of the presentinvention.

[FIG. 4] A view illustrating histograms of the inside area according tothe embodiment of the present invention.

[FIG. 5] A view illustrating a position-luminance graph of an outsidearea according to the embodiment of the present invention.

[FIG. 6] A flowchart for generating reference data according to theembodiment of the present invention.

[FIG. 7] A flowchart when inspecting a printed circuit board accordingto the embodiment of the present invention.

DESCRIPTION OF REFERENCE NUMERALS

1 . . . Substrate inspection apparatus

2 a, 2 b . . . Printed circuit board (2 a: Reference printed circuitboard, 2 b: Printed circuit board to be inspected)

7 . . . Inside area data generation means

9 . . . Inside determination means

10 . . . Outside area data generation means

11 . . . Outside determination means

20 . . . Pattern area

21 a . . . Outline of inside area

21 b . . . Inside area

22 a . . . Outline of outside area

22 b . . . Ring-shaped area

1. A substrate inspection apparatus for inspecting a formation state ofa pattern area formed on a substrate, the substrate inspection apparatuscomprising: an inside area data generation means for generating a firstinspection data of an inside area of a pattern area to be inspected, theinside area data generation means performing a reduction processing ofthe inside area to generate the first inspection data, an outside areadata generation means for generating a second inspection data of anoutside area of the pattern area, the outside area surrounding theinside area, the outside area data generation means performing anexpansion processing of the outside area to generate the secondinspection data; an inside determination means for determining whetherthe pattern area is defective or not defective by comparing the firstinspection data with predetermined inside reference inspection data; andan outside determination means for determining whether the pattern areais defective by comparing the second inspection data with predeterminedoutside reference inspection data.
 2. The substrate inspection apparatusaccording to claim 1, wherein the first inspection data differs form thesecond inspection data.
 3. The substrate inspection apparatus accordingto claim 1, wherein the first inspection data is data about luminanceand the second inspection data is data about shapes.
 4. The substrateinspection apparatus according to claim 1, wherein a stricter inspectionreference is applied to the outside area than to the inside area.
 5. Thesubstrate inspection apparatus according to claim 1, wherein the outsidearea data generation means generates the second inspection data based onluminance in a normal direction of the pattern area.
 6. The substrateinspection apparatus according to claim 1, wherein the outside area datageneration means detects inflection points in a position-luminance graphas the second inspection data, and wherein the outside determinationmeans determines whether the pattern area is defective by comparing thesecond inspection data with predetermined outside reference inspectiondata.